<template>
  <div style="height:100%;width:100%;">
    <div class="itcCanvas" style="height:100%;width:100%;"></div>
  </div>
</template>

 <script>
export default {
  name: "itcIncome",
  mounted() {
    this.getPie();
  },
  methods: {
    getPie() {
      const that = this;
      var myChart = this.$echarts.init(document.querySelector(".itcCanvas"));
      let option = {
      tooltip: {
          trigger: "axis",
          axisPointer: {
            type: "shadow",
            }
          },
        legend: {
           // itemHeight: 5,
           // itemWidth: 5,
             data: ['基本面收入(亿元)', 'DICT收入(亿元)'],
             y:'bottom',

              // orient:'horizontal',

            },

        grid: {
          left: "20px",
          right: "20px",
          bottom:'90px',

         },
        xAxis: {
          type: 'category',
          // boundaryGap: false,
          data: ['1901', '1902', '1903', '1904', '1905', '1906', '1907', '1908', '1909', '1910', '1911', '1912', '2001', '2002'],
          axisLabel: {
            interval:0,
            rotate:40 ,
            },
          },
        yAxis:{
                  type: 'value',
                  // min: (minData-(minData+maxData1)%2)*2.2,
                  // // max: 100,
                  // // interval: 50,
                  splitLine:{show: false},  //去除网格线
                  axisLabel: {
                      formatter: '{value} 亿元',
                      show:false
                  },
                  splitArea:{
                      show:true,
                      areaStyle:{
                          color:'#f5f5f5'
                      },
                  },
                  axisTick:{ //y轴刻度线
                      show:false
                  },
                  axisLine:{ //y轴
                      show:false
                  },
              },
        series: [
          {
            type: "line",
             name: '基本面收入(亿元)',
            smooth: true,
            data: [40,30,60,73,34,23,22,34,55,45,47,23],
            lineStyle: {
                   normal: {
                       color: "#00b050", // 线条颜色#00b050
                       width: 0.8
                   }
            },
          },

        {
          type: "line",
           name: 'DICT收入(亿元)',
          data: [30,50,10,43,54,63,72,24,65,45,77,43],
          lineStyle: {
                 normal: {
                     color: "#be4b48", // 线条颜色#00b050
                     width: 0.8
                 }
          },
        },
      ],
      };
      myChart.setOption(option);
    }
  },
};
 </script>

 <style>
 </style>
